# coding: utf-8
from enum import Enum

from qfluentwidgets import FluentIconBase, Theme, getIconColor

from .setting import IMAGES_DIR


class Icon(FluentIconBase, Enum):
    CLASS = 'Class'
    MIN_VIDEO = 'MinVideo'
    SELECT = "Select"
    SETTINGS = "Settings"
    SETTINGS_FILLED = "SettingsFilled"
    CLOUD_DOWNLOAD = "CloudDownload"
    CLOUD_DOWNLOAD_FILLED = "CloudDownloadFilled"
    LINK = "Link"

    def path(self, theme=Theme.AUTO):
        return (IMAGES_DIR / f"icons/{self.value}_{getIconColor(theme)}.svg").as_posix()


class SingleIcon(FluentIconBase, Enum):
    LOGO_PNG = 'Logo.png'
    LOGO_ICO = 'Logo.ico'
    M3U8_FILE = 'M3U8File.svg'
    STREAM_FILE = 'StreamFile.svg'
    RENAME = 'Rename.svg'
    COVER = 'Cover.svg'
    MP4 = 'MP4.svg'
    FFMPEG = 'FFmpeg.svg'
    BILI = 'Bili.svg'

    def path(self, theme=Theme.AUTO) -> str:
        return (IMAGES_DIR / 'single' / self.value).as_posix()
